package com.tedu.bill.demo2;

import java.util.LinkedList;

/**
 * Author：毕龙
 * Date: 2024/5/19 11:00
 */
public class TestLinkedList {
    public static void main(String[] args) {
        LinkedList<String> list = new LinkedList<>();
        list.add("王伟");
        list.add(1,"子枭1");
        list.add(1,"子枭2");
        list.add(1,"子枭3");
        list.add(1,"子枭4");
        list.add(1,"子枭5");
        list.add(1,"子枭6");
        list.add(1,"子枭7");
        list.add(1,"子枭8");
        String s = list.get(8);
        System.out.println(s);

        list.forEach(System.out::println);
    }
}
